Skip to content

feat: support provider name aliases in -p flag#94

Open
ekg wants to merge 1 commit intomicrosoft:mainfrom
ekg:feat/provider-name-alias
Open

feat: support provider name aliases in -p flag#94
ekg wants to merge 1 commit intomicrosoft:mainfrom
ekg:feat/provider-name-alias

Conversation

@ekg
Copy link

@ekg ekg commented Feb 19, 2026

Summary

  • Allow providers to have a user-facing name field in settings.yaml that -p matches against before falling back to module name
  • Enables intuitive selection when the same module (e.g., provider-openai) serves different backends (OpenAI, OpenRouter, Azure)
  • Error messages now show both name and module when available

Example

providers:
- name: openrouter
  module: provider-openai
  config:
    base_url: https://openrouter.ai/api/v1
    default_model: minimax/minimax-m2.5
amplifier run -p openrouter "hello"   # matches by name
amplifier run -p openai "hello"       # still works (module fallback)

Change

14 lines in commands/run.py — name match checked first, then existing module lookup as fallback. Zero impact when name field is absent.

Test plan

  • -p openrouter matches provider with name: openrouter
  • -p openai still works via module fallback (provider-openai)
  • Error message shows openrouter (openai) format when name is set
  • No regression when no name field is present in settings

Allow providers to have a user-facing `name` field in settings.yaml
that the -p flag matches against before falling back to module name.

This enables more intuitive provider selection when the same module
(e.g., provider-openai) is configured for different services:

  providers:
  - name: openrouter
    module: provider-openai
    config:
      base_url: https://openrouter.ai/api/v1

  amplifier run -p openrouter "hello"

The name match is checked first; if no name matches, the existing
module-based lookup runs as before. Error messages now show both
name and module when available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant